<?php
/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2019-01-01
 * Time: 20:06
 */

return [
    'SERVER_NAME' => "EasySwoole",
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT'           => 9501,
        'SERVER_TYPE'    => EASYSWOOLE_WEB_SERVER, //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER,EASYSWOOLE_REDIS_SERVER
        'SOCK_TYPE'      => SWOOLE_TCP,
        'RUN_MODEL'      => SWOOLE_PROCESS,
        'SETTING' => [
            'worker_num'    => 8,
            'max_request'   => 10000,
            'reload_async'  => true,
            'max_wait_time' => 3,
            //静态资源
            'enable_static_handler' => true,
            'document_root' => EASYSWOOLE_ROOT . '/Public',
        ],
        'TASK' => ['workerNum'=>8,'maxRunningNum'=>128,'timeout'=>15]
    ],
    
    'DISPLAY_ERROR'  => true,
    'PHAR'           => [
        'EXCLUDE' => ['.idea', 'Log', 'Temp', 'easyswoole', 'easyswoole.install']
    ],

    'TEMP_DIR' => EASYSWOOLE_ROOT.'/Temp',
    'LOG_DIR'  => EASYSWOOLE_ROOT.'/Log',

    /*################ Mysql CONFIG ##################*/
    'MYSQL'         => [
        'host'          => '127.0.0.1',
        'port'          => 3306,
        'user'          => 'debian-sys-maint',
        'password'      => 'qfaccU1LTvkmirmQ',
        'database'      => 'bt_server',
        'timeout'       => 5,
        'charset'       => 'utf8mb4',
        'POOL_MAX_NUM'  => 20,
        'POOL_TIME_OUT' => 1
    ],

    /*################ Redis CONFIG ##################*/
    'REDIS' => [
        'host'      => '127.0.0.1',
        'port'      => '6379',
    	'auth'      => '',
    	'POOL_MAX_NUM'  => 5,
    	'POOL_TIME_OUT' => 1,
        //'serialize' => \EasySwoole\Redis\Config\RedisConfig::SERIALIZE_NONE
    ],

];
